package io.renren.modules.back.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 商品属性实体
 *
 * @author zzh
 * @email 862583291@qq.com
 * @date 2019年02月02日 上午15:28:55
 */
@TableName("nideshop_goods_attribute")
@Data
public class GoodsAttributeEntity implements Serializable {
  private static final long serialVersionUID = 1L;

  /**
   * 主键
   */
  @TableId(type = IdType.AUTO)
  private Integer id;

  /**
   * 商品Id
   */
  private Integer goodsId;

  /**
   * 属性Id
   */
  private Integer attributeId;

  /**
   * 属性值
   */
  @NotBlank(message = "属性值不能为空", groups = {AddGroup.class, UpdateGroup.class})
  private String value;
}
